package com.jyx.api.cms;

import com.jyx.framework.domain.cms.CmsPage;
import com.jyx.framework.domain.cms.request.QueryPageRequest;
import com.jyx.framework.domain.cms.response.CmsPageResult;
import com.jyx.framework.domain.cms.response.CmsPostPageResult;
import com.jyx.framework.model.response.QueryResponseResult;
import com.jyx.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

@Api(value = "cms页面管理接口",description = "cms管理页面接口，提供页面的增删改查")
public interface CmsPageControllerApi {
    @ApiOperation("分页查询页面列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "page",value = "页码",
                    required = true,paramType = "path",dataType = "int"),
            @ApiImplicitParam(name = "size",value = "每页多少数据",
                    required = true,paramType = "path",dataType = "int"),
    })
    QueryResponseResult findList(int page, int size, QueryPageRequest queryPageRequest);

    @ApiOperation("添加页面")
    CmsPageResult add(CmsPage cmsPage);

    @ApiOperation("根据Id查询页面")
    @ApiImplicitParam(name = "id",value = "页面id")
    CmsPage getById(String id);


    @ApiOperation("修改页面")
    @ApiImplicitParam(name = "id",value = "页面id")
    CmsPageResult update(String id,CmsPage cmsPage);

    @ApiOperation("删除页面")
    ResponseResult delete(String id);

    @ApiOperation("发布页面")
    ResponseResult post(String pageId);

    @ApiOperation("预览页面的保存页面")
    CmsPageResult save(CmsPage cmsPage);

    @ApiOperation("一键发布课程")
    CmsPostPageResult postPageQuick(CmsPage cmsPage);

}
